import Vue from "vue";
import Vuex from 'vuex';

Vue.use(Vuex)

const store = new Vuex.Store({
  strict: process.env.NODE_ENV === 'development',

  state: {

    num: 100
  },
  mutations: {
    buyLipstick(state, num) {
      state.num -= num
    }
    
  },
  actions: {
    buyLipstickAsync(context, num) {
      setTimeout(() => {
        context.commit('buyLipstick', num)
      }, 1000)
    }
  },

  modules: {

  },
  getters: {

  }



})



export default store